@import './theme/default';
@import './theme/font';

.zent-color-picker-popover {
  z-index: 2000;
}

.zent-color-picker {
  cursor: pointer;
  display: inline-block;
  outline: none;
  position: relative;
  text-align: left;
  user-select: none;
  height: 30px;
  vertical-align: middle;

  &_disabled {
    cursor: not-allowed;
  }

  &-wrapper {
    font-size: 0;
  }

  &--open {
    .zent-color-picker__text {
      @include theme-color(border-color, primary, 4);

      &::after {
        transform: rotate(180deg);
      }
    }
  }

  &__text {
    @include theme-color(border-color, stroke, 5);
    @include theme-color(background-color, stroke, 9);
    box-sizing: border-box;
    border-width: 1px;
    border-style: solid;
    border-radius: 2px;
    width: 60px;
    height: 32px;
    outline: none;
    transition: border-color 0.25s;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  &__preview {
    box-sizing: border-box;
    width: 52px;
    height: 24px;
  }

  &-colors-select {
    @include theme-color(background-color, stroke, 9);
    @include theme-shadow(layer);
    width: 190px;
    box-sizing: content-box;
    line-height: 10px;
    padding-top: 10px;
    border-radius: 2px;
  }

  &-colors-select__preview {
    width: 20px;
    height: 20px;
    display: inline-block;
    margin-left: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    box-shadow: inset 0 0 0 1px rgba($color-black, 0.15); // border
    border-radius: 2px;
  }
}
